Method and system for payment through mobile devices

ABSTRACT

Processing payment through a mobile device includes: receiving a command; using an upper layer application program executing on the mobile device to generate a payment request based on the command and send the payment request to be processed by a lower layer payment program, using the lower layer payment program executing on the mobile device to monitor the payment request sent from the localhost address of the mobile device via the predetermined port; in response to the payment request, using the lower layer payment program to provide an input interface for payment information in and receive the input payment information; using the lower layer payment program to connect with a payment server and pass the payment information over a network to the payment server; and using the lower layer payment program to transfer a payment processing result received from the payment server, to the upper layer application program.

CROSS REFERENCE TO OTHER APPLICATIONS

This application is a continuation of co-pending U.S. patent applicationSer. No. 12/802,280, entitled METHOD AND SYSTEM FOR PAYMENT THROUGHMOBILE DEVICES filed Jun. 2, 2010 which is incorporated herein byreference in its entirety for all purposes, which claims priority toPeople's Republic of China Patent Application No. 200910145486.7entitled PAYMENT METHOD IN MOBILE TERMINAL AND MOBILE DEVICE filed Jun.9, 2009, which is incorporated herein by reference in its entirety forall purposes.

FIELD OF THE INVENTION

The present invention relates to the field of computer software and inparticular to a method and system for payment through mobile devices.

BACKGROUND OF THE INVENTION

As mobile devices, such as PDAs, mobile phones and smart phones, becomewidely used, mobile payment becomes a new and rapidly-adoptedalternative payment method. Instead of paying with cash, checks, orcredit cards a consumer can use a mobile phone to pay for a wide rangeof goods and services, such as music, online games, utility bills,books, magazines, etc.

Today, mobile device application programs commonly run on platforms suchas Java 2 Micro Edition (J2ME). J2ME is a Java environment designed formobile devices and embedded systems. Target devices range fromindustrial controls to mobile phones, digital set-top boxes, andnavigation systems.

To implement a mobile payment application, a user program often needs toemploy the functionalities provided by the device, such as system code,Application Programming Interface (API) code, etc. For example, a mobiledevice user may browse a shopping website using an Internet browserprogram written in HTML or Java script and then decide to pay for theitems she selected. This transaction is typically done through anInternet banking client running in the mobile device. For example,mobile phone client Alipay™ is such an Internet banking client. TheAlipay™ client is written in the C++ language and directly calls thedevice APIs. The C++ program code of mobile phone client Alipay™ iscompiled to generate an Alipay™ executable file, that is, a file with an“.exe” extension.

In the conventional mobile device application program, script code (HTMLcode) of the browser application program and other application programcode, such as J2ME application code, do not provide a mechanism fordirect execution of an executable file because the J2ME platform doesnot provide interfaces to support such functionality. A browser orscript program can neither directly invoke a file with an “.exe”extension nor communicate with another program via an API such asSendMessage. Therefore, a more effective way for the user applicationprogram to execute or communicate with the system or API program isneeded.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of the invention are disclosed in the followingdetailed description and the accompanying drawings.

FIG. 1 is a schematic diagram illustrating a network deploying anembodiment of a mobile device payment system.

FIG. 2 is a flowchart illustrating an embodiment of a mobile devicepayment process.

FIG. 3 is another schematic diagram illustrating a network deploying anembodiment of a mobile device payment system.

FIG. 4 is another flowchart illustrating an embodiment of a mobiledevice payment process.

FIG. 5 is a block diagram illustrating components of an example mobiledevice system environment 500 that may be used in accordance with anembodiment of the present invention.

DETAILED DESCRIPTION

The invention can be implemented in numerous ways, including as aprocess; an apparatus; a system; a composition of matter; a computerprogram product embodied on a computer-readable storage medium; and/or aprocessor, such as a processor configured to execute instructions storedon and/or provided by a memory coupled to the processor. In thisspecification, these implementations, or any other form that theinvention may take, may be referred to as techniques. In general, theorder of the steps of disclosed processes may be altered within thescope of the invention. Unless stated otherwise, a component such as aprocessor or a memory described as being configured to perform a taskmay be implemented as a general component that is temporarily configuredto perform the task at a given time, or a specific component that ismanufactured to perform the task. As used herein, the term “processor”refers to one or more devices, circuits, and/or processing coresconfigured to process data, such as computer program instructions.

A detailed description of one or more embodiments of the invention isprovided below along with accompanying figures that illustrate theprinciples of the invention. The invention is described in connectionwith such embodiments, but the invention is not limited to anyembodiment. The scope of the invention is limited only by the claims,and the invention encompasses numerous alternatives, modifications, andequivalents. Numerous specific details are set forth in the followingdescription in order to provide a thorough understanding of theinvention. These details are provided for the purpose of example, andthe invention may be practiced according to the claims without some orall of these specific details. For the purpose of clarity, technicalmaterial that is known in the technical fields related to the inventionhas not been described in detail so that the invention is notunnecessarily obscured.

Payment processing for a mobile device is disclosed. In someembodiments, an upper layer program interacts with a lower layer programon the same device, via a port on the localhost address of the mobiledevice to process the payment. As used herein, program code thatprovides a user interface and interacts with the user, such as mobiledevice client application running in the J2ME platform implemented asscript, Java™ code, etc., is referred to as upper layer code or upperlayer program. Program code that interacts with the device's hardwareplatform, such as the device's system code or Application ProgramInterface (API) code, is referred to as lower layer code or lower layerprogram. The upper and lower layers interact with each other to processthe payment.

FIG. 1 is a schematic diagram illustrating a network deploying anembodiment of the mobile device payment system. In the example shown, amobile device 140 is installed with a web browser to enable a user tobrowse a webpage on web server 110 through a network 130. If a mobiledevice user browses a shopping website and follows the purchasing linkof the website to conduct a network payment, the web browser on themobile device then calls a lower layer mobile application program on thesame device through a payment process such as process 200 of FIG. 2 toaccomplish payment through communicating with a payment server 120.

In this example, the executable file that interacts with the deviceplatform and connects to the network is referred to as the lower layerprogram. The user/client application, such as a web browser, on themobile device is referred to as an upper layer payment applicationprogram. The upper layer payment application program is sometimesimplemented using a series of script code, such as HTML or Java script.

FIG. 2 is a flowchart illustrating an embodiment of a mobile devicepayment process. An upper layer application program interacts with alower layer application through a predetermined port of the address“localhost” of the mobile device on which the upper layer applicationprograms resides.

At 201, upon receiving a command for opening a purchase link on awebsite, an upper layer application program is used to send a request tothe mobile device's “localhost” address via a predetermined port.

In some embodiments, the upper layer program sends the request to thenetwork address of “localhost” via the predetermined port. In computernetworking, “localhost” is the standard hostname given to the address ofthe loopback network interface. As defined by Internet Engineering TaskForce (IETF) Request for Comments (RFC) 2602, the name is also areserved domain name set aside to avoid confusion to the narrowerdefinition as a hostname. “Localhost” translates to the loopback IPaddress 127.0.0.1. Connecting to locally hosted network service, orother inter-process communications, can be performed through theloopback address in a highly efficient manner.

A port in computer networking is an application-specific orprocess-specific software construct serving as a communication endpointused by Transport Layer protocols, such as TCP (a connection-orientedprotocol) and UDP (a connectionless protocol). A specific port isidentified by its number (commonly known as the port number), the IPaddress it is associated with, and the protocol used for networkcommunication.

The connection-oriented protocol has three main phases: first,establishing a connection prior to transmission of data; second,transmitting the data after establishing the connection; third,releasing the connection after completing transmission of the data. Theconnection-oriented protocol provides the advantage of data reliabilityand accuracy of data transmission. The connectionless service ischaracterized by the existence of only one phase of data transmission.Therefore, all overhead other than data transmission is eliminated. Inaddition, as long as a transmission entity is active, the receptionentity does not have to be active. The connectionless service providesadvantages of flexibility, convenience, and promptness and isparticularly suitable for transport of a small number of sporadicmessages which may not require high accuracy and reliability. The TCP/IPprotocol is connectionless on the network layer. However, it isconnection-oriented on the transport layer and ports are involved on thetransportation layer as well. All the ports below 1024 in the protocolare defined explicitly to correspond to some common services over theInternet. These common services are classified into two categories:those using TCP ports and those using UDP ports.

A communication port that can be named and addressed in the network isan assignable resource of the operating system. In the seven-layerprotocol of the Open System Interconnection Reference Model (OSI), theprimary difference between the transport layer and the network layer isthat the transport layer provides a process communication capability sothat a final address of communication over the network includes a hostaddress and also an identifier that can describe the process. Therefore,a port in the TCP/IP protocol can be regarded as an identifier of acommunication process over the network.

After an application program (generally referred to as a process afterbeing loaded into a memory) establishes a connection with a port througha system call (also referred to as binding), a corresponding processreceives data transported to the port from the transport layer, and datatransmitted from the corresponding process to the transport layer isoutput via the port. In an implementation of the TCP/IP protocol, a portoperation is similar to a general I/O operation: acquisition of a portby a process is equivalent to acquisition of a locally unique I/O file.In addition, the port can be accessed using normal reading and writingmanners similar to a file descriptor and each port is provided with aninteger descriptor referred to as a port number to be distinguished fromanother port. Since the two protocols of TCP and UDP on the TCP/IPtransport layer are two independent software modules, respective portnumbers are also mutually independent. For example, there is a portnumbered 255 for the TCP and also another port numbered 255 for the UDP.A port number can be assigned in two general manners, one of which isreferred to as global assignment, i.e., centralized assignment where arecognized authoritative centralized agency performs and publishes tothe public unified assignment according to the user's request, and localassignment, also referred to as a dynamic connection where a processintended to access a service on the transport layer presents anapplication to the local operating system, the operating system returnsa locally unique port number, and the process further connects (binds)itself with the port through appropriate system calling. TCP/IP portnumbers are assigned in a combination of the two manners by classifyingthe port numbers into two categories where a fraction of them are takenas reserved ports to be globally assigned to a service process. Eachstandard server is provided with a globally recognized port, referred toas a well-known port, with the same port number even on differentmachines. The remaining ports are taken as free ports to be locallyassigned. As specified in the TCP and UDP protocols, only a port below256 can be taken as a reserved port.

Therefore, in some embodiments, a webpage script is implemented tosupport sending an HTTP request to the network address of the mobiledevice using the Hyper Text Transfer Protocol (HTTP). And address127.0.0.1 or “localhost” can be assigned as the network address of themobile device as mentioned above. Furthermore, an HTTP request generallyadopts the default port number 80. Then, the communication between theupper and lower layer application programs can be enabled through thewebpage script, that is, the upper layer application program sends anHTTP request to the “localhost” via a predetermined port over thenetwork so that the lower layer application program of the local hostcan receive the request.

At 202, the lower layer payment code monitors the request sent from the“localhost” over the loopback network of the mobile device via thepredetermined port.

Monitoring the HTTP request via the predetermined port can be achievedthrough a daemon process. After the lower layer application program isloaded into the memory and is being run, a daemon process associatedwith the lower layer application program can be initiated. The daemonprocess can also be initiated as a service of the mobile device uponpower-on. Whenever the upper layer application program of the mobiledevice sends an HTTP request to the “localhost” via the predeterminedport, for example, port 80, the daemon process of the lower layerprogram can detect the HTTP request and further perform a correspondingaction.

At 203, the lower layer payment code provides an input interface forpayment information in response to the HTTP request of the upper layerapplication code and receives the input payment information.

In some embodiments, upon receiving an HTTP payment request from theupper layer application code, the lower layer payment code callsdirectly to the mobile device's API to execute the relevant paymentprocess. Furthermore, in the HTTP request, some parameters, such aspasswords, can be passed to the lower layer payment code and the lowerlayer payment program can call the functions provided by the device APIto process the parameters, for example, in response to a parameterpassed from an HTTP request, a keypad-password-input operation isexecuted by calling the lower layer I/O and encryption APIs. Moreover,the HTTP request can further include a demand for processing resultfeedback.

At 204, the lower layer payment code connects with a payment server andpasses the payment information over the network.

In some embodiments, the lower layer application program then interactswith a payment server through the Internet to verify the paymentinformation and return the payment processing result. For example, anAlipay™™ server can be used as the payment server.

At 205, the lower layer payment code returns the processing result tothe upper layer application code. In some embodiments, the processingresult is returned by sending the result information to “localhost” viathe predetermined port. The daemon process of the upper layerapplication code in the memory can detect the result. In someembodiments, after the upper layer application code sends the paymentrequest to the “localhost,” the program is blocked and waiting thefeedback from the lower layer application program. Then, the upper layerapplication code performs a plurality of processes based on the result.For example, a webpage script opens a webpage of the shopping website toindicate whether the payment is successful and presents the paymentresult to the mobile device user.

FIG. 3 is another schematic diagram illustrating a network deploying anembodiment of the mobile device payment system. In the example shown, amobile device 340 is typically installed with a plurality of gamesoftware to enable a user to play paid-games on the game server 310through a network 330. For example, a J2ME game provides the gamecontent of the first and second stages free to the user. After the usercompletes playing the first two stages, the J2ME game software thenprompts the user to pay for playing the advanced stages of the game. Ifa mobile device user decides to proceed, the game server 310 will sendthe mobile device user payment instructions and the user will use themobile application programs on the same device to accomplish a paymentprocess through communication with a payment server 420. In someembodiments, the lower layer mobile application is in the form of anexecutable file and will be referred to as the lower layer payment code.The J2ME program on the device that provides the gaming interface andpayment interface to the user will be referred to as upper layerapplication code.

FIG. 4 is a flowchart illustrating an embodiment of a mobile devicepayment process.

At 401, upon receiving a payment command from a device user, an upperlayer game program sends a J2ME request to the “localhost” via apredetermined port. In some embodiments, after interacting with the gameserver through the J2ME program on the mobile device, the user of themobile device receives a prompt for payment. A J2ME command with thepayment request which includes the network address and a destinationport is sent to the “localhost” so that the lower layer payment code ofthe “localhost” can receive the request. Conventionally, the networkaddress of the “localhost” is 127.0.0.1 and the J2ME command adopts aport number.

Processes 402-404 are similar to processes 202-204 which are illustratedabove, except that the payment request in 402-404 is in the J2ME commandformat and the port number can be any port number which is not reservedby the networking protocol in the mobile device.

At 405, the lower layer payment code returns the processing result tothe upper layer application code.

In some embodiments, upon receiving the payment result from the paymentserver, the lower layer payment code returns the payment processingresult to the upper layer J2ME game program. The payment result is sentto the “localhost” via the predetermined port of the J2ME requestmentioned in 401. And the daemon process of the upper layer game programin the memory can detect the result. Then, the upper layer applicationcode performs a plurality of processes based on the result. If thepayment is successful, the J2ME game program sends a command to the gameserver indicating successful payment by the user. Furthermore, the gameserver provides to the J2ME program a command to unlock part of thecontents in the J2ME program, for example, the advanced stage of thegame program, or the game server provides a download of the advancedstage game contents so that the device user can proceed with the J2MEgame. If the payment is not successful, the upper layer game programwill present the payment failure status to the device user, who will beprevented from proceeding to the next stage of the game.

Example implementations of embodiments of systems for mobile devicepayment are described below. The systems are described to include anumber of modules or units. The module or units can be implemented assoftware components executing on one or more processors, or as hardwaresuch as programmable logic devices and/or Application SpecificIntegrated Circuits designed to perform certain functions orcombinations thereof. In some embodiments, the modules/units/subunitscan be embodied by a form of software products which can be stored in anonvolatile storage medium (such as optical disk, flash storage device,mobile hard disk, etc.), including a number of instructions for making acomputer device (such as personal computers, servers, network equipment,etc.) implement the methods described in the embodiments of the presentinvention. The modules or units may be implemented on a single device ordistributed across multiple devices. The functions of the modules orunits may be merged into one another or further split into multiplesub-modules or sub-units.

FIG. 5 is a block diagram illustrating components of an example mobiledevice system environment 500 that may be used in accordance with anembodiment of the present invention. As shown, system environment 500includes an upper layer application code module 510 and a lower layerapplication program module 520. Both of the modules interact with the“localhost” 530 and a port 540 on the mobile device. Module 510 isconfigured to execute an upper layer payment application program to senda payment request to the “localhost” via a predetermined port, then waitand receive the feedback/payment result from a lower layer payment codeand further conduct a plurality of processes based on the paymentresult. Module 520 is configured to monitor the request sent from thelocalhost over the network of the mobile device via the predeterminedport and provides an input interface for payment information in responseto the payment request of the upper layer application code and receivethe input of the payment information, then return the processing resultto the upper layer application code.

One skilled in the art should understand that the embodiments of thisapplication may be provided as a method, a system, a computer, or amobile device product. Therefore, this application may be in the form offull hardware embodiments, full software embodiments, or a combinationthereof. Moreover, this application may be in the form of a computerprogram or mobile device application program product that is implementedon one or more computer or mobile device-usable storage media(including, without limitation, magnetic disk, CD-ROM, flash, andoptical storages) containing computer or mobile device-usable programcode. That program code includes instructions to make a computerapparatus or a mobile device execute full or partial embodiments ofmethods described above.

The respective embodiments of the present application are described oneby one, the same and similar parts of the embodiments are made byreference and in each embodiment is emphasized the difference from otherembodiments. Specifically, the system embodiments are described brieflydue to similarity to the method embodiments and relevant modules of thesystem embodiments are made with reference to the method embodiments.

The present application may be applied to many universal or dedicatedcomputing system environments or configurations, for example, a personalcomputer, a server computer, a mobile device, a top box, a handset or aportable device, a flat-panel device, a multi-processor system, amicroprocessor-based system, a set-top box, a programmable consumerelectric device, a network PC, a minicomputer, a large scale computer, adistributed computing system including any one of the above systems ordevices, etc.

This application is described referring to the flow chart and/or blockdiagram of the method, system, and computer program product according tothe embodiments of this application. It should be understood that eachflow and/or block in the flow chart and/or block diagram and thecombination of flows and/or blocks in the flow chart and/or blockdiagram may be realized in computer program instruction. In fact, theentire application may be described in a general context of a computerexecutable instruction that is executed by a computer, for example, aprogram module. Generally, the program module includes routines,programs, objects, components, data structures, etc. for executing aspecified task or implementing a specified abstract data type.Alternatively, the present invention may be implemented in a distributedcomputing environment, where a remote processing device connectedthrough a communication network executes the task. In the distributedcomputing environment, the program module may be located in a local orremote computer storage medium which includes a storage device.

Although the foregoing embodiments have been described in some detailfor purposes of clarity of understanding, the invention is not limitedto the details provided. There are many alternative ways of implementingthe invention. The disclosed embodiments are illustrative and notrestrictive.

What is claimed is:
 1. A method for processing payment through a mobiledevice, comprising: receiving a command; using an upper layerapplication program executing on the mobile device to generate a paymentrequest based on the command and send the payment request to beprocessed by a lower layer payment program, wherein: the payment requestis sent to a localhost address of the mobile device via a predeterminedport; the payment request is sent using a transmission control protocol(TCP) or a user datagram protocol (UDP); the localhost address of themobile device is a loopback Internet Protocol (IP) address; and thesending of the payment request to be processed by the lower layerpayment program comprises: blocking the upper layer application program;determining whether feedback has been received from the lower layerpayment program; and in the event that the feedback has been receivedfrom the lower layer payment program, unblocking the upper layerapplication program; using the lower layer payment program executing onthe mobile device to monitor the payment request sent from the localhostaddress of the mobile device via the predetermined port; in response tothe payment request, using the lower layer payment program to provide aninput interface for payment information in and receive the input paymentinformation; using the lower layer payment program to connect with apayment server and pass the payment information over a network to thepayment server; using the lower layer payment program to transfer apayment processing result received from the payment server, to the upperlayer application program; and after the upper layer application programhas been unblocked, presenting to a user, using the upper layerapplication program, a webpage to indicate whether the payment has beensuccessfully processed.
 2. The method of claim 1, wherein: the paymentrequest includes a password; and in response to the payment request, themethod further comprises processing the password by calling anencryption application programming interface (API).
 3. The method ofclaim 1, wherein the upper layer application program is a program thatprovides a user interface configured to interact with the user.
 4. Themethod of claim 1, wherein the lower layer payment program is a programthat interacts with the mobile device's hardware platform.
 5. The methodof claim 1, wherein the command is to open a purchase link of a website.6. The method of claim 1, wherein the payment request is a HypertextTransport Protocol (HTTP) based request.
 7. The method of claim 1,wherein the payment request sent by the upper layer application programincludes a plurality of parameters.
 8. The method of claim 7, whereinthe lower layer payment programs further performs a plurality ofcorresponding processes in response to the respective ones of theplurality of parameters in the payment request.
 9. The method of claim1, wherein the upper layer application program includes a web browser.10. The method of claim 1, wherein the payment server includes an Alipayserver.
 11. A system for processing payment through a mobile device,comprising: one or more processors coupled to an interface, configuredto: receive a command; use an upper layer application program executingon the mobile device to generate a payment request based on the commandand send the payment request to be processed by a lower layer paymentprogram, wherein: the payment request is sent to a localhost address ofthe mobile device via a predetermined port; the payment request is sentusing a transmission control protocol (TCP) or a user datagram protocol(UDP); the localhost address of the mobile device is a loopback InternetProtocol (IP) address; and the sending of the payment request to beprocessed by the lower layer payment program comprises: block the upperlayer application program; determine whether feedback has been receivedfrom the lower layer payment program; and in the event that the feedbackhas been received from the lower layer payment program, unblock theupper layer application program; use the lower layer payment programexecuting on the mobile device to monitor the payment request sent fromthe localhost address of the mobile device via the predetermined port;in response to the payment request, use the lower layer payment programto provide an input interface for payment information in and receive theinput payment information; use the lower layer payment program toconnect with a payment server and pass the payment information over anetwork to the payment server; and use the lower layer payment programto transfer a payment processing result received from the paymentserver, to the upper layer application program; and after the upperlayer application program has been unblocked, present to a user, usingthe upper layer application program, a webpage to indicate whether thepayment has been successfully processed; and one or more memoriescoupled to the one or more processors, configured to provide theprocessors with instructions.
 12. The system of claim 11, wherein theupper layer application program is a program that provides a userinterface configured to interact with the user.
 13. The system of claim11, wherein the lower layer payment program is a program that interactswith the mobile device's hardware platform.
 14. The system of claim 11,wherein the command is to open a purchase link of a website.
 15. Thesystem of claim 11, wherein the payment request sent by the upper layerapplication program includes a plurality of parameters.
 16. A computerprogram product for processing payment through a mobile device, thecomputer program product being embodied in a tangible non-transitorycomputer readable storage medium and comprising computer instructionsfor: receiving a command; using an upper layer application program togenerate a payment request based on the command and send the paymentrequest to be processed by a lower layer payment program, wherein: thepayment request is sent to a localhost address of the mobile device viaa predetermined port; the payment request is sent using a transmissioncontrol protocol (TCP) or a user datagram protocol (UDP); the localhostaddress of the mobile device is a loopback Internet Protocol (IP)address; and the sending of the payment request to be processed by thelower layer payment program comprises: blocking the upper layerapplication program; determining whether feedback has been received fromthe lower layer payment program; and in the event that the feedback hasbeen received from the lower layer payment program, unblocking the upperlayer application program; using the lower layer payment program tomonitor the payment request sent from the localhost address of themobile device via the predetermined port; in response to the paymentrequest, using the lower layer payment program to provide an inputinterface for payment information in and receive the input paymentinformation; using the lower layer payment program to connect with apayment server and pass the payment information over a network to thepayment server; using the lower layer payment program to transfer apayment processing result received from the payment server, to the upperlayer application program; and after the upper layer application programhas been unblocked, presenting to a user, using the upper layerapplication program, a webpage to indicate whether the payment has beensuccessfully processed.